ke.create({
	data:{
		form:{},
		rules:{
			user: [
				{ required: true, message: '请输入登录名', trigger: 'blur' },
				{ max: 20, message: '登录名应在 20 个字符内', trigger: 'blur' }
			],
			pass: [
				{ required: true, message: '请输入密码', trigger: 'blur' },
				{ max: 20, message: '密码应在 20 个字符内', trigger: 'blur' }
			],
		}
	},
	created:function(){
		if(top.location.href!=location.href){
			top.location.href=location.href
		}
	},
	methods:{
		onLogin:function(){
			var form=this.form
			ke.submitForm({
				data:this.form,
				success:function(res){
					if(res.code==0){
						vm.$message.error(res.msg)
					}else{
						vm.$message.success(res.msg)
						setTimeout( function(){
							location.href=res.url
						},1500)
					}
				}
			})
		}
	}
})